package client.comm.baoding.ui

import android.content.Intent
import client.comm.commlib.utils.StoreUtil
import client.comm.baoding.BaseMiddleActivity
import client.comm.baoding.R
import client.comm.baoding.api.bean.UserInfo
import client.comm.baoding.databinding.ActivityHmBinding
import client.comm.baoding.ui.vm.HmViewModel

class HmActivity : BaseMiddleActivity<HmViewModel, ActivityHmBinding>() {

    val user: UserInfo? by lazy {
        StoreUtil.getBean<UserInfo>(this@HmActivity)
    }

    override fun getLayout(): Int {
        return R.layout.activity_hm
    }

    override fun initViewModel(): HmViewModel = createViewModel()

    override fun initView() {
        binding.event = this
        binding.vm = viewModel
        binding.user = user
    }

    fun hmjl() {
        startActivity(Intent(this, HmjlActivity::class.java))
    }

    fun wybuy() {
        startActivity(Intent(this, HmBuyActivity::class.java))
    }

    fun wysell() {
        startActivity(Intent(this, HmTbActivity::class.java))
    }
}